<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/inforIndex.css?v=1.1.1">
<section id="information">
    <!-- 此处为左右侧边栏位置-->
    <?php $cate = \Yii::$app->request->get('cate', 'info'); ?>
    <?php $page = \Yii::$app->request->get('page', 1); ?>
    <div class="infoContent">
        <!-- 左 -->
        <div class="infoContentLeft" style="margin-top: 30px">
            <!-- banner-->
            <div class="banner">
                <!--上下轮播-->
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        <?php foreach ($banner as $v) { ?>
                            <div class="swiper-slide"><a
                                        href="<?php echo $v['url'] != false ? $v['url'] : 'javascript:void(0)' ?>"><img
                                            src="<?php echo $v['pic'] ?>" alt="雅思活动"></a></div>
                        <?php } ?>
                        <!-- <div class="swiper-slide"><a href=""><img src="https://gmat.viplgw.cn/files/attach/images/20210311/1615427308109502.png" alt="雅思活动"></a></div> -->
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
            <!-- 资讯分类-->
            <div class="infoModel">
                <div class="infoTypeCover">
                    <a onclick="_czc.push(['_trackEvent','雅思资讯','最新资讯','',''])"
                       href="/news/info.html" <?php echo $cate == 1 || $cate == 'info' ? 'class="on"' : '' ?>>最新资讯</a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯','干货分享','',''])"
                       href="/news/share.html" <?php echo $cate == 2 || $cate == 'share' ? 'class="on"' : '' ?>>干货分享</a>
                    <!--                    <a href="/active.html" target="_blank">热门活动</a>-->
                    <a onclick="_czc.push(['_trackEvent','雅思资讯','考位资讯','',''])"
                       href="/news/loc_info.html" <?php echo $cate == 4 || $cate == 'loc_info' ? 'class="on"' : '' ?>>考位资讯</a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯','申友头条','',''])"
                       href="/news/shenyou.html" <?php echo $cate == 3 || $cate == 'shenyou' ? 'class="on"' : '' ?>>申友头条</a>
                </div>
                <div class="infoList">
                    <!--     渲染时 删掉 -->
                    <?php foreach ($data as $k => $v) { ?>
                        <div class="infoListItem"
                             onclick="_czc.push(['_trackEvent','雅思资讯','查看详情','<?php echo $v['name'] ?>',''])">
                            <a href="<?php echo $v['cate'] == 3 ? '/news-headline/' . $v['id'] . '.html' : '/news-information/' . $v['id'] . '.html' ?>"
                               class="listItemLeft">
                                <img src="<?php echo $v['pic'] ?>" alt="">
                            </a>
                            <div class="listItemRight">
                                <a href="<?php echo $v['cate'] == 3 ? '/news-headline/' . $v['id'] . '.html' : '/news-information/' . $v['id'] . '.html' ?>"
                                   class="listItemTitle"><?php echo $v['name'] ?></a>
                                <a href="<?php echo $v['cate'] == 3 ? '/news-headline/' . $v['id'] . '.html' : '/news-information/' . $v['id'] . '.html' ?>"
                                   class="listItemContent"><?php echo $v['summary'] ?></a>
                                <div class="listItemAuth">
                                    <div class="publish"><?php echo $v['author'] == false ? '申友' : $v['author'] ?>
                                        发布于<?php echo $v['pushTime'] == false ? date('Y-m-d', $v['createTime']) : date('Y-m-d', $v['pushTime']) ?></div>
                                    <div class="thumb">
                                        <p><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/3@2x.png"
                                                alt=""><span><?php echo $v['viewCount'] ?></span></p>
                                        <!--                                    <p><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/1@2x.png" alt=""><span>678</span></p>-->
                                        <!-- 点过赞 -->
                                        <!--                                    <p><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/2@2x.png" alt=""><span>678</span></p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php } ?>
                </div>
                <!-- 分页 -->
                <div class="fenPage">
                    <ul>
                        <?php
                        foreach ($pageArray as $k => $v) { ?>
                            <li class="iPage <?php echo $v == $page ? 'on' : '' ?>"><?php echo $v ?></li>
                        <?php } ?>
                        <?php if (count($pageArray) > 1) { ?>
                            <li class="nextPage">下一页</li>
                            <div class="toPage">
                                <span>前往</span>
                                <input type="text" class="pageNumInput" @blur="toPageNum" v-model="pageNum">
                                <span>页</span>
                            </div>
                        <?php } ?>
                    </ul>
                </div>
            </div>

        </div>
        <!-- 右 -->
        <div class="infoContentRight">
            <!-- 搜索 -->
            <!--            <div class="searchCover">-->
            <!--                <input type="text" placeholder="请输入关键词" class="searchInput" id="searchInput" v-model="keyword">-->
            <!--                <a href="javascript:void(0)" class="searchBtn" @click="seracrh">搜索</a>-->
            <!--            </div>-->
            <!-- 热门课程 -->
            <div class="hotCourseCover">
                <div class="rightTitle">
                    <p>申友雅思热门课程</p>
                    <a href="/mall.html">MORE <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/4@2x.png"
                                                   alt=""></a>
                </div>
                <!--     渲染时 删掉  v-for="item in 2"-->
                <?php foreach ($course as $v) { ?>
                    <div class="hotCourseItem">
                        <p class="itemCourseTitle">
                            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/5@2x.png" alt="">
                            <span> <?php echo $v['name'] ?></span>
                        </p>

                        <p class="courseInfo">
                            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/7@2x.png" alt="">
                            <?php echo $v['classTime'] ?>
                        </p>
                        <p class="courseInfo">
                            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/6@2x.png" alt=""
                                 >
                            <?php echo $v['duration'] ?>课时
                        </p>

                        <div class="courseBtn">
                            <a onclick="_czc.push(['_trackEvent','雅思资讯-申友雅思热门课程','立即咨询','<?php echo $v['name'] ?>',''])"
                               href="https://p.qiao.baidu.com/cps/chat?siteId=16998561&userId=33849315&siteToken=0848542c0e71b685b68768fcec8e99ef"
                               target="_blank" class="zxBtn">立即咨询</a>
                            <a onclick="_czc.push(['_trackEvent','雅思资讯-申友雅思热门课程','查看详情','<?php echo $v['name'] ?>',''])"
                               href="/course-detail/<?php echo $v['id'] ?>.html" class="detailBtn">查看详情</a>
                        </div>
                    </div>
                <?php } ?>
            </div>
            <!-- 申友头条 -->
            <!--            <div class="hotCourseCover">-->
            <!--                <div class="rightTitle">-->
            <!--                    <p>申友头条</p>-->
            <!--                    <a href="/news/3.html">MORE <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/4@2x.png" alt=""></a>-->
            <!--                </div>-->
            <!--                --><?php //foreach ($top as $k=>$v) { ?>
            <!--                <a  href="/news-headline/--><?php //echo $v['id']?><!--.html" class="leadNewItem" >-->
            <!--                    <p class="leadNewImg">-->
            <!--                        <img src="--><?php //echo $v['pic']?><!--" alt="">-->
            <!--                        <span>--><?php //echo $k+1?><!--</span>-->
            <!--                    </p>-->
            <!--                    <div class="leadNewRight">-->
            <!--                        <p class="newsWords">--><?php //echo  $v['name']?><!--</p>-->
            <!--                        <p class="ydNum"><span>-->
            <?php //echo $v['pushTime']==false?date('Y-m-d',$v['createTime']):date('Y-m-d',$v['pushTime'])?><!--</span><span>-->
            <?php //echo  $v['viewCount']?><!--人阅读</span></p>-->
            <!--                    </div>-->
            <!--                </a>-->
            <!--                --><?php //}?>
            <!--            </div>-->
            <!-- 雅思指南 -->
            <div class="hotCourseCover">
                <div class="rightTitle">
                    <p>雅思指南</p>
                </div>
                <div class="guideCover">
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','考试指南','',''])"
                       href="http://www.thinkuprep.com/guide.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/9@2x.png" alt=""></div>
                        <p>考试指南</p></a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','考试地点','',''])"
                       href="http://www.thinkuprep.com/ieltstestcenter.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/11@2x.png" alt=""></div>
                        <p>考试地点</p></a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','考试日历','',''])"
                       href="http://www.thinkuprep.com/calendar.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/13@2x.png" alt="">
                        </div>
                        <p>考试日历</p></a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','校区查询','',''])"
                       href="http://www.thinkuprep.com/city.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/10@2x.png" alt="">
                        </div>
                        <p>校区查询</p></a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','师资团队','',''])"
                       href="http://www.thinkuprep.com/teacher.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/16@2x.png" alt="">
                        </div>
                        <p>师资团队</p></a>
                    <a onclick="_czc.push(['_trackEvent','雅思资讯-雅思指南','热门活动','',''])"
                       href="http://www.thinkuprep.com/active.html">
                        <div><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/zx/15@2x.png" alt="">
                        </div>
                        <p>热门活动</p></a>
                </div>
            </div>

        </div>
    </div>
</section>
<script src="https://file.viplgw.cn/ui/thinku-ielts-new/js/informaIndex.js?v=1.1"></script>
<script>
    $('.fenPage .iPage').click(function () {
        var url = $('.infoTypeCover a.on').attr('href');
        var page = $(this).html();
        _czc.push(['_trackEvent', '雅思资讯', '下一页', $('.infoTypeCover a.on').html(), ''])
        window.location.href = url + '?page=' + page;
    });
    $('.nextPage').click(function () {
        var url = $('.infoTypeCover a.on').attr('href');
        var page = parseInt($('.fenPage .iPage.on').html()) + 1;
        if ($('.fenPage .iPage.on').next().html() != '下一页') {
            window.location.href = url + '?page=' + page;
        }
    })
</script>
